<template>
  <!-- 弹窗 -->
  <el-dialog title="修改数据说明" :visible.sync="isShowDialog" :close-on-click-modal="false" width="520px">
    <!-- 具体form表单 -->
    <el-form label-position="right" ref="form" :model="form" label-width="100px">
      <el-form-item label="数据创建时间">
        {{form._time}}
      </el-form-item>
      <el-form-item label="数据说明">
        <el-input v-model="form.remark" placeholder="请填写数据说明" :maxlength="40" show-word-limit></el-input>
      </el-form-item>
    </el-form>
    <!-- 操作按钮 -->
    <span slot="footer" class="dialog-footer">
      <el-button class="common_btn-white" @click="isShowDialog = false">取消</el-button>
      <el-button class="common_btn-defalut" type="primary" @click="submitData">确定</el-button>
    </span>
  </el-dialog>
</template>

<script>
import { doUpdateRemark } from '@/services/model/project-info'

export default {
  data () {
    return {
      // 是否展示弹窗
      isShowDialog: false,
      // 当前表单数据
      form: {}
    }
  },
  methods: {
    show (row) {
      this.form = row
      this.isShowDialog = true
    },
    // 数据提交
    async submitData () {
      await doUpdateRemark(this.form)
      this.$message.success('数据说明已更新')
      this.$emit('update')
      this.isShowDialog = false
    }
  }
}
</script>

<style>

</style>
